package io.linfeng.modules.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import io.linfeng.common.vo.PostDetailResponse;
import io.linfeng.common.vo.PostVipInfoResponse;
import io.linfeng.common.vo.TopicPostResponse;
import io.linfeng.common.utils.AppPageUtils;
import io.linfeng.common.utils.PageUtils;
import io.linfeng.modules.admin.entity.AppUserEntity;
import io.linfeng.modules.admin.entity.PostEntity;
import io.linfeng.modules.app.param.*;

import java.net.MalformedURLException;
import java.util.List;
import java.util.Map;

/**
 * 
 *
 * @author linfeng
 * @email 2445465217@qq.com
 * @date 2022-01-23 20:49:55
 */
public interface PostService extends IService<PostEntity> {

    PageUtils queryPage(Map<String, Object> params);

    Integer findTopicPostCount(Integer topicId);

    List<TopicPostResponse> findTopicPostCountBatch(List<Integer> topicIdList);

    PostDetailResponse detail(Integer id);

    AppPageUtils queryPageList(PostListForm request);

    AppPageUtils getPostListByDiscussId(PostListForm request);

    AppPageUtils getListByTopicId(PostListForm request);

    AppPageUtils getListByUid(PostListForm request);

    Integer addComment(AddCommentForm request, AppUserEntity user);

    void addCollection(AddCollectionForm request, AppUserEntity user);

    AppPageUtils joinTopicPost(Integer page, AppUserEntity user);

    AppPageUtils lastPost(Integer page);

    AppPageUtils followUserPost(Integer page, AppUserEntity user);

    List<String> findThreeMedia(Integer id);

    Integer getPostNumberByUid(Integer uid);

    Integer addPost(AddPostForm request, AppUserEntity user);

    AppPageUtils myCollectPost(Integer page,AppUserEntity user);

    AppPageUtils myPost(Integer page, AppUserEntity user);

    AppPageUtils search(Integer page, String keyword);

    void del(Integer id, Integer uid);

    Integer getPostNumberByDiscussId(Integer id);

    Boolean setAdmin(SetAdminForm request, AppUserEntity user);

    Boolean cancelAdmin(SetAdminForm request, AppUserEntity user);


    void deleteByAdmin(List<Integer> integers);

    PostVipInfoResponse getVipPostInfo(VipPostInfoForm request);

    Integer voteAdd(AddVoteForm request, AppUserEntity user);

    void userVote(UserVoteForm request, AppUserEntity user);

    void downByAdmin(DownPostForm param);

    void upByAdmin(List<Integer> list);

    void getRobotPostContent();

    public AppUserEntity virtualUser();

    Boolean setPostTop(SetPostTopForm request, AppUserEntity user);

    Boolean topPostDel(SetPostTopForm request, AppUserEntity user);

    String getSharePic(Integer postId, String origin, String url,AppUserEntity user) throws Exception;

    List<PostEntity> getTopPost();

    List<PostEntity> getHotPost();

    AppPageUtils getPostListByType(Integer page, Integer type);

    Integer addArticle(AddArticleForm request, Integer uid);

    void postAddByAdmin(AddPostByAdminForm request);

    AppPageUtils queryShortVideoPageList(VideoListForm request);

    void addReadCount(Integer postId);

    void deletePostIdByAdmin(DeletePostForm param);
}

